package com.manage.controller;

import com.manage.common.lang.Result;
import com.manage.entity.vo.PieEchartsRes;
import com.manage.mapper.WarehousingMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author wzy
 * @Date 2024/6/12 17:10
 * @description: 入库管理
 */
@RestController
@RequestMapping("/warehousing")
public class WarehousingController {
    @Autowired
    private WarehousingMapper warehousingMapper;
    /**
     * 统计各个教材的入库数量
     * @return
     */
    @GetMapping("/count")
    public Result count() {
        List<PieEchartsRes> list =  warehousingMapper.countForEcharts();
        return Result.success(list);
    }
}
